package com.highper.common.configuration;

import com.highper.common.runner.StartRunner;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;

/**
 * @Author ZhangGJ
 * @Date 2022/01/29 10:16
 */
public class StartRunnerConfigure {

    private final ConfigurableApplicationContext context;

    private final Environment environment;

    public StartRunnerConfigure(ConfigurableApplicationContext context, Environment environment) {
        this.context = context;
        this.environment = environment;
    }

    @Bean
    public StartRunner startRunner() {
        return new StartRunner(context, environment);
    }
}
